<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./react/react18.development.js"></script>
<script src="./react/react-dom18.development.js"></script>
<script src="./react/babel.min.js"></script>
</head>
<body>
    <div id="main"></div>

    <script type="text/babel">
        let num = 100;
        let arr = ["aaa","bbb","ccc"];
        let aaa = (<div className="box">
            <h2>这是个标题</h2>
            <p>{num}</p>
            <p>{num * 10}</p>
            <p>{num > 100 ? "大于" : num == 100 ? "等于" : "小于"}</p>
          <button onClick={test}>点击</button>
            <ul>
  {/*  arr.map(item=>(<li>{item}</li>)) */}
 
               {arr.map((item,index)=>{
                return (<li key={index}>{item}</li>)
               })}
                </ul>
            </div>);

            var box = document.querySelector("#main");
            var root = ReactDOM.createRoot(box);
            root.render(aaa);
    </script>
</body>
</html>